<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
	<title>商品详情-${setting.name}</title>
	[#include "/common/include.ftl"/]
    <link rel="stylesheet" href="${base}/resource/plug/zoom/easyzoom.css">
    <script src="${base}/resource/plug/zoom/easyzoom.js"></script>
	<link type="text/css" rel="stylesheet" href="${base}/resource/css/product.css">
	<script type="text/javascript" src="${base}/resource/js/product.js"></script>
	<script type="text/javascript">
		var goodsName = '${goods.name}';
		var goodsId = '${goods.id}';
		(function() {
			$(function() {
				var $thumb, defImg;
				$thumb = $('#P_UlThumb li:first').children('a');
				defImg = {
				  big: $thumb.attr('href'),
				  def: $thumb.attr('data-standard')
				};
				return $('.imagezoom-wrap').attr('href', defImg.big).find('img').attr('data-original', defImg.def);
			});
		}).call(this);
	</script>
</head>
  
<body class="customer" onload="addHistory(${goods.id},'${setting.cookieDomain!}')">
	[#include "/common/header.ftl"/]
	<!--商品详情页开始-->
	<div class="crumbs">
    	<a href="${base}/index.jhtml">首页</a>
		[#if goods.cateTreePath?has_content]
			[#list goods.cateTreePath as cate]
				<i style='font-family: simsun;font-style: normal;'> > </i> 
				<a href="${base}/list-cat-${cate.id}.jhtml">${cate.name}</a>
			[/#list]
		[/#if]
    </div>
    <div class="product-page">
		<!--1 商品头部信息-->
		<div id="detail">
			<div class="hp-gallery">
				<div class="hp-booth easyzoom easyzoom--adjacent">
					<a href="" class="imagezoom-wrap"><img class="lazy"  width="418" height="418"></a>
				</div>
				<ul id="P_UlThumb" class="hp-thumb">
					[#if goods.image_files?has_content]
						[#list goods.image_files as img]
						<li class="[#if img_index = 0]current[/#if]">
							<a href="[@Pic pic=img /]" data-standard="[@Pic pic=img postfix='418x418'/]">
								<img class="lazy" data-original="[@Pic pic=img postfix='56x56'/]" postfix="56x56" width="56" height="56">
							</a>
						</li>
						[/#list]
					[/#if]
				</ul>
			</div>
	        <div class="hp-wrap">
				<div class="hp-detail-hd">
					<h1>${goods.name}</h1>
					<p>${(goods.tip)!''}</p>
				</div>
				<div class="hp-promo-meta">
					<div class="hp-price">
						<dl>
							<dt>价格</dt>
							<dd class="price">${currency(goods.price, true)}</dd>
						</dl>
						<ul class="hp-count">
							<li scroll="#P_TabBar" show="3">
								<p class="hp-count-num">${(goods.cmts)!'0'}</p>
								<p>累计评论</p>
							</li>
							<li scroll="#P_TabBar" show="4" class="hp-count-first">
								<p class="hp-count-num">${(goods.sales)!'0'}</p>
								<p>交易成功</p>
							</li>
						</ul>
					</div>
				</div>
				<div class="hp-desc">
					[#--<dl class="hp-promo">
						<dt>促销信息</dt>
						<dd>
							<em class="fl">赠品</em>
							<ul class="fl">
								<li class="font-red">赠品</li>
								<li>送赠品送赠品送赠品送赠品</li>
							</ul>
							<div class="clear"></div>
						</dd>
					</dl>--]
					<dl>
						<dt>商品编号</dt>
						<dd>${(goods.code)!''}</dd>
					</dl>
					[#--<dl>
						<dt>商品规格</dt>
						<dd>${(goods.spec)!''}</dd>
					</dl>
					<dl>
						<dt>生产厂家</dt>
						<dd>${(goods.manufacturer)!''}</dd>
					</dl>--]
					[#--<dl>
						<dt>卖家支持</dt>
						<dd>在线支付满89元包邮</dd>
					</dl>--]
				</div>
                <div class="hp-buy-wrap">
                	[#if !goods.isMarketable?? || !goods.isMarketable]
						<span style="color:red; font-size:14px;">商品已下架!</span>
					[#else]
	                    <dl class="hp-amount">
	                        <dt>数量</dt>
	                        <dd>
	                            <div class="hp-stock product-stock"><a href="javascript:" class="cart-num-minus">-</a>
	                                <input type="text" value="1" class="cart-num"><a href="javascript:" class="cart-num-plus">+</a>
	                            </div>
	                        </dd>
	                    </dl>
	                    <div class="hp-action">
							[#if !(goods.stock)?? || goods.stock <= 0]
	                            <a id="tellMeNotice" product-id="${goods.id}" href="javascript:" class="hp-button">到货通知</a>
							[#else]
	                            <a product-id="${goods.id}" class="hp-btn-add product-add-cart">加入购物车</a>
							[/#if]
							[#if goods.hasCollected]
								<a class="hp-collect hp-collected">已收藏</a>
							[#else]
								<a href="javascript:addFavorite(${goods.id});" class="hp-collect">加入收藏夹</a>
							[/#if]
						</div>
					[/#if]
                </div>
	        </div>
            <div class="hp-reviewsCard"></div>
			<div class='clear'></div>
		</div>
	  
		<!--2 商品内容-->
		<div id="P_SaleCombo">
			<div class="combo-inner click-tabs">
				[@b2c_goods_list cateCode=goods.goodsCategoryCode count=4]
                    <ul class="tab-nav tab-nav-combo tabs-nav">
                        <li class="tab-b current">推荐商品</li>
                    </ul>
					[#assign glist = goodsList]
					[#if !glist?has_content]
						[@b2c_goods_list count=4]
							[#assign glist = goodsList]
						[/@b2c_goods_list]
					[/#if]
				<div class="tab-content tab-content-combo tabs-cont">
                    <!--推荐商品-->

					<ul class="tab-content-list tab-c current">
						[#if glist?has_content]
						[#list glist as bean]
						[#if bean.id != goods.id]
						<li>
							<p-img></p-img>
							<a href="${bean.path}" title="${bean.name}" target="_blank">
								<img class="lazy" data-original="[@Pic pic=bean.image_default postfix='130x130'/]" postfix="130x130" width="130" height="130"/>
							</a>
							<div class="p-name">
								<a href="${bean.path}" target="_blank">${bean.name}</a>
							</div>
							<div class="p-price"><span>${currency(bean.price, true)}</span></div>
						</li>
						[/#if]
						[/#list]
						[/#if]
					</ul>
					<!--人气组合-->
					[#--<div class="tab-combination tab-c [#if !hasRecomment]current[/#if]">
						<ul class="tab-content-list">
							<li class="master">
								<div class="p-img">
									<a><img class="lazy" data-original="[@Pic pic=goods.image_default /]"></a></div>
								<div class="p-name"><a>${goods.name}</a></div>
								<div class="p-price"><span>${currency(goods.price, true)}</span></div><i></i>
							</li>
							<li class="suits last">
								<div class="p-img"><a><img src="http://img13.360buyimg.com/n3/g13/M09/00/04/rBEhVFMycqYIAAAAAAFgt-UdddMAAKveQB_K7UAAWDP367.jpg"></a></div>
								<div class="p-name"><a>雷麦（LEIMAI） LM-T1 Kindle Paperwhite电子</a></div>
								<div class="p-price">
								<input type="checkbox"><span>￥12.0</span>
								</div><i></i>
							</li>
                            <li class="suits last">
                                <div class="p-img"><a><img src="http://img13.360buyimg.com/n3/g13/M09/00/04/rBEhVFMycqYIAAAAAAFgt-UdddMAAKveQB_K7UAAWDP367.jpg"></a></div>
                                <div class="p-name"><a>雷麦（LEIMAI） LM-T1 Kindle Paperwhite电子</a></div>
                                <div class="p-price">
                                    <input type="checkbox"><span>￥12.0</span>
                                </div><i></i>
                            </li>
                            <li class="suits last">
                                <div class="p-img"><a><img src="http://img13.360buyimg.com/n3/g13/M09/00/04/rBEhVFMycqYIAAAAAAFgt-UdddMAAKveQB_K7UAAWDP367.jpg"></a></div>
                                <div class="p-name"><a>雷麦（LEIMAI） LM-T1 Kindle Paperwhite电子</a></div>
                                <div class="p-price">
                                    <input type="checkbox"><span>￥12.0</span>
                                </div><i></i>
                            </li>
						</ul>
						<div class="tab-com-amount"><i></i>
							<p class="selected-num"><span class="text">已选择</span><strong>0</strong><span class="text">个配件</span></p>
							<div class="dp">
								<p>搭 配 价：<span>￥499.00</span></p>
								<p>获得优惠：
								<s>￥0.00</s>
								</p>
							</div>
							<a class="hp-btn-buy">立即购买</a>
						</div>
					</div>--]
				</div>
				[/@b2c_goods_list]
			</div>
		</div>
	  
		<!-- -->
		<div class="product-content mt10">
			<div class="cb-style1-left fl">
				[@b2c_brand_list gcCode=goods.goodsCategoryCode count=10]
				[#if brandList?has_content]
				<div class="lpl-b">
					<h3 class="lpl-h">同类品牌</h3>
					<ul class="lpl-list lpl-brand">
						[#list brandList as brand]
						<li><a href="${brand.detailUrl}" target="_blank">${brand.name}</a></li>
						[/#list]
					</ul>
				</div>
				[/#if]
				[/@b2c_brand_list]
				
				[@b2c_goods_list cateCode=goods.goodsCategoryCode count=2 orderBy="views desc"]
                <div class="lpl-b">
                    <h3 class="lpl-h">热销商品</h3>
					<ul class="lpl-list lpl-img">
				[#if goodsList?has_content]
					[#list goodsList as bean]
						<li>
							<dl>
								<dt>
									<a href="${bean.path}" target="_blank" title="${bean.name}">
										<img class="lazy" data-original="[@Pic pic=bean.image_default postfix='88x88'/]" postfix="88x88" height="88" width="88">
									</a>
								</dt>
								<dd>
									<p><a href="${bean.path}" target="_blank">${bean.name}</a></p>
									<p class="price">${currency(bean.price, true)}</p>
								</dd>
							</dl>
						</li>
					[/#list]
				[#else]
					[@b2c_goods_list count=2 orderBy="views desc"]
						[#list goodsList as bean]
						<li>
							<dl>
								<dt>
									<a href="${bean.path}" target="_blank" title="${bean.name}">
										<img src="[@Pic pic=bean.image_default postfix='88x88'/]" width="88" height="88">
									</a>
								</dt>
								<dd>
									<p><a href="${bean.path}" target="_blank">${bean.name}</a></p>
									<p class="price">${currency(bean.price, true)}</p>
								</dd>
							</dl>
						</li>
						[/#list]
					[/@b2c_goods_list]
				[/#if]
                    </ul>
                </div>
				[/@b2c_goods_list]
				<!--广告-->
				<div class="lpl-advertising">
					[@b2c_advert_list position="goods_detail_left" num=2]
						[#list tag_list as advert]
						<a href="${advert.url}" target="_blank" title="${advert.name}">
							<img src="[@Pic pic=advert.logo/]" width="205" height="260">
						</a>
						[/#list]
					[/@b2c_advert_list]
				</div>
			</div>
			
			<!--TAB部分-->
			<div class="cb-style1-right click-tabs">
				<ul id="P_TabBar">
					<li show='1-3' class="tab-bar current"><a href="javascript:">商品详情</a></li>
					<li show='2-3' class="tab-bar"><a href="javascript:">商品说明书</a></li>
					<li show='3' class="tab-bar"><a href="javascript:">累计评价 ${(goods.cmts)!0}</a></li>
					<li show='4' class="tab-bar record"><a href="javascript:">销售记录 ${(goods.sales)!0}</a></li>
				</ul>
				<div class="tabs-cont">
					<!--商品详情-->
					<div class="product-info tab-c current" identity="1">
						<div class="pih">
							<p>品牌名称：
								[#if (goods.brand)??]
									<a href="${base}/brand-${goods.brand.id}.jhtml" target="_blank">${(goods.brand.name)!''}</a>
								[/#if]
							</p>
							<ul>
							  <li>产品名称：${(goods.name)!''}</li>
							[#--  <li>商品类型：${(goods.goodsType)!''}</li>
							  <li>生产厂家：${(goods.manufacturer)!''}</li>--]
							</ul>
						</div>

						[#if goods.message?? && goods.message?trim != '']
						<div class="pih-cont">
							[#--<img src="http://img02.j1.com/upload/detail/image/20140415/04_01.jpg">--]
							${goods.message}
						</div>
						[/#if]
					</div>
					<!--商品说明书-->
					<div id="P_ProductInfo" class="tab-c" identity='2'>
						<h2 class="p-info-title mt10">${goods.name}</h2>
						<table>
							<tr><td width="15%" class="key">名称:</td><td class="val">${goods.name}</td></tr>
							[#if goods.introduction?? && goods.introduction.compose?length gt 0]
							<tr><td width="15%" class="key">成分:</td><td class="val">${goods.introduction.compose}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.property?length gt 0]
							<tr><td width="15%" class="key">性状:</td><td class="val">${goods.introduction.property}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.function?length gt 0]
							<tr><td width="15%" class="key">功能主治:</td><td class="val">${goods.introduction.function}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.direction?length gt 0]
							<tr><td width="15%" class="key">用法用量:</td><td class="val">${goods.introduction.direction}</td></tr>
							[/#if] 
							[#if goods.introduction?? && goods.introduction.badness?length gt 0]
							<tr><td width="15%" class="key">不良反应:</td><td class="val">${goods.introduction.badness}</td></tr>
							[/#if] 
							[#if goods.introduction?? && goods.introduction.taboo?length gt 0]
							<tr><td width="15%" class="key">禁忌:</td><td class="val">${goods.introduction.taboo}</td></tr>
							[/#if] 
							[#if goods.introduction?? && goods.introduction.notice?length gt 0]
							<tr><td width="15%" class="key">注意事项:</td><td class="val">${goods.introduction.notice}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.reciprocity?length gt 0]
							<tr><td width="15%" class="key">药物相互作用:</td><td class="val">${goods.introduction.reciprocity}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.store?length gt 0]
							<tr><td width="15%" class="key">贮藏:</td><td class="val">${goods.introduction.store}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.packing?length gt 0]
							<tr><td width="15%" class="key">包装:</td><td class="val">${goods.introduction.packing}</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.validity?length gt 0]
							<tr><td width="15%" class="key">有效期:</td><td class="val">${goods.introduction.validity}个月</td></tr>
							[/#if]
							[#if goods.introduction?? && goods.introduction.standard?length gt 0]
							<tr><td width="15%" class="key">执行标准:</td><td class="val">${goods.introduction.standard}</td></tr>
							[/#if]
						</table>
					</div>
					<!--商品评论-->
					<div id="P_Reviews" class="tab-c" identity='3'>
						<div class="hp-rate click-tabs">
							<div id="R_tabs" class="rate-toolbar">
								<ul>
									<li class="current">全部评价 (${(goods.cmts)!0})</li>
									<li reviewType="0">好评 (${(goods.cmtsJson.hignOpinion)!'0'})</li>
									<li reviewType="1">中评 (${(goods.cmtsJson.middleOpinion)!'0'})</li>
									<li reviewType="2">差评 (${(goods.cmtsJson.lowOpinion)!'0'})</li>
								</ul>
							</div>
							<div id="R_grid" class="rate-grid">
							</div>
						</div>
					</div>
					<!--购买记录-->
					<div id="P_SalesRecords" identity="4" class="mt20 tab-c">
						<table>
							<tr>
								<th width="100">买家</th>
								<th width="400">商品名称</th>
								<th width="150">价格</th>
								<th width="150">购买数量</th>
								<th>下单时间</th>
							</tr>
						</table>
		            </div>
				</div>
			</div>
		</div>
    </div>
	[#include "common/footer-slidebar-lazyload.ftl"]
	</body>
</html>